<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>component-3</title>
    <script type="text/javascript" src="../assets/js/vue.js"></script>
</head>

<body>
    <h1>component-3</h1>
    <hr>
    <div id="app">

        <panda></panda>
    </div>


    <script type="text/javascript">
        var city = {
            template: `<div style="color:blue;">cishuan of China</div>`
        }
        var pandaComponent = {
            template: `<div style="color:red;">
               <p>Panda from China</p>
               <city></city>
            </div>`,
            components: {
                "city": city
            }
        }


        var app = new Vue({
            el: '#app',
            data: {
                message: 'sichuan'
            },
            components: {
                "panda": pandaComponent

            }
        })


    </script>
</body>

</html>